package zcj.stu.Entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;
import java.util.List;

@Data
@Document(collection = "order")
public class Order {
    @Id
    private String _id;
    private UserInfo userInfo;
    private List<Goods>selectedCart;
    private BigDecimal total;
    private int selectedGoodsNum;
    private String order_status;
    private String order_add_time;
    @Data
    public class UserInfo{
        private String nickName;
        private String avatarUrl;
        private String openid;
    }
    @Data
    public static class Goods {
        @Id
        private String _id;
        private String goods_name;
        private BigDecimal goods_price;
        private long num;
        private String goods_desc;
        private long goods_count;
        private List<String>img;
    }
}
